package com.ruoyi.business.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 jt_order
 *
 * @author Alan Zhang
 * @date 2025-04-10
 */
public class JtOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单id */
    private Long orderId;

    /** 买家用户ID */
    private Long userId;

    /** 仓库ID */
    private Long warehouseId;

    /** 仓库 */
    @Excel(name = "仓库")
    private Long warehouseName;

    @Excel(name = "买家")
    private String buyer;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 物流公司 */
    @Excel(name = "物流公司")
    private String logisticsCompany;

    /** 运单号 */
    @Excel(name = "运单号")
    private String trackingNumber;

    /** 订单运费 */
    @Excel(name = "订单运费", cellType = Excel.ColumnType.NUMERIC)
    private BigDecimal freightAmount;

    /** 购买数量 */
    @Excel(name = "购买数量", cellType = Excel.ColumnType.NUMERIC)
    private Long buyQty;

    /** 货币 CNY */
    @Excel(name = "货币")
    private String currency;

    /** 订单金额 */
    @Excel(name = "订单金额", cellType = Excel.ColumnType.NUMERIC)
    private BigDecimal orderAmount;

    /** 支付金额 */
    @Excel(name = "支付金额", cellType = Excel.ColumnType.NUMERIC)
    private BigDecimal paymentAmount;

    /** 优惠金额 */
    @Excel(name = "优惠金额", cellType = Excel.ColumnType.NUMERIC)
    private BigDecimal reduceAmount;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date paymentTime;

    /** 订单状态 0 待支付  1待发货 2已发货 3完成 */
    @Excel(name = "订单状态", dictType = "jt_order_status")
    private Integer orderStatus;

    /** 收件人 */
    @Excel(name = "收件人")
    private String receiver;

    /** 收件人电话 */
    @Excel(name = "收件人电话")
    private String phoneNumber;

    /** 国家 */
    @Excel(name = "国家")
    private String country;

    /** 省 */
    private String province;

    /** 市 */
    private String city;

    /** 区 */
    private String district;

    /** 详细地址 */
    @Excel(name = "详细地址")
    private String fullAddress;

    /** 邮编 */
    @Excel(name = "邮编")
    private String zipCode;

    /** 买家备注 */
    @Excel(name = "买家备注")
    private String buyerRemark;

    /** 卖家备注 */
    @Excel(name = "卖家备注")
    private String sellerRemark;

    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date dvyTime;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date finallyTime;

    /** 取消时间 */
    private Date cancelTime;

    /** 是否已经支付，1：已经支付过，0：没有支付过 */
    @Excel(name = "是否已经支付", readConverterExp = "，1=已经支付，0=没有支付")
    private Integer isPayed;

    /** 用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除 */
    private Integer deleteStatus;

    /** 退款状态 0:默认,1:在处理,2:处理完成 */
    @Excel(name = "退款状态", readConverterExp = "0=默认,1=在处理,2=处理完成")
    private Integer refundStatus;

    /** 订单类型 */
    @Excel(name = "订单类型", readConverterExp = "1=普通订单,2=分销订单")
    private Integer orderType;

    /** 订单关闭原因 1-超时未支付 2-退款关闭 3-买家取消 4-已通过货到付款交易 */
    @Excel(name = "订单关闭原因",readConverterExp = "1=超时未支付,2=退款关闭,3=买家取消,4=已通过货到付款交易")
    private Integer closeType;

    /** 订单明细信息 */
    private List<JtOrderItem> jtOrderItemList;

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(Long warehouseName) {
        this.warehouseName = warehouseName;
    }

    public String getBuyer() {
        return buyer;
    }

    public void setBuyer(String buyer) {
        this.buyer = buyer;
    }

    public void setOrderNo(String orderNo)
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo()
    {
        return orderNo;
    }

    public void setLogisticsCompany(String logisticsCompany)
    {
        this.logisticsCompany = logisticsCompany;
    }

    public String getLogisticsCompany()
    {
        return logisticsCompany;
    }

    public void setTrackingNumber(String trackingNumber)
    {
        this.trackingNumber = trackingNumber;
    }

    public String getTrackingNumber()
    {
        return trackingNumber;
    }

    public void setFreightAmount(BigDecimal freightAmount)
    {
        this.freightAmount = freightAmount;
    }

    public BigDecimal getFreightAmount()
    {
        return freightAmount;
    }

    public void setBuyQty(Long buyQty)
    {
        this.buyQty = buyQty;
    }

    public Long getBuyQty()
    {
        return buyQty;
    }

    public void setCurrency(String currency)
    {
        this.currency = currency;
    }

    public String getCurrency()
    {
        return currency;
    }

    public void setOrderAmount(BigDecimal orderAmount)
    {
        this.orderAmount = orderAmount;
    }

    public BigDecimal getOrderAmount()
    {
        return orderAmount;
    }

    public void setPaymentAmount(BigDecimal paymentAmount)
    {
        this.paymentAmount = paymentAmount;
    }

    public BigDecimal getPaymentAmount()
    {
        return paymentAmount;
    }

    public void setReduceAmount(BigDecimal reduceAmount)
    {
        this.reduceAmount = reduceAmount;
    }

    public BigDecimal getReduceAmount()
    {
        return reduceAmount;
    }

    public void setPaymentTime(Date paymentTime)
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime()
    {
        return paymentTime;
    }

    public void setOrderStatus(Integer orderStatus)
    {
        this.orderStatus = orderStatus;
    }

    public Integer getOrderStatus()
    {
        return orderStatus;
    }

    public void setReceiver(String receiver)
    {
        this.receiver = receiver;
    }

    public String getReceiver()
    {
        return receiver;
    }

    public void setPhoneNumber(String phoneNumber)
    {
        this.phoneNumber = phoneNumber;
    }

    public String getPhoneNumber()
    {
        return phoneNumber;
    }

    public void setCountry(String country)
    {
        this.country = country;
    }

    public String getCountry()
    {
        return country;
    }

    public void setProvince(String province)
    {
        this.province = province;
    }

    public String getProvince()
    {
        return province;
    }

    public void setCity(String city)
    {
        this.city = city;
    }

    public String getCity()
    {
        return city;
    }

    public void setDistrict(String district)
    {
        this.district = district;
    }

    public String getDistrict()
    {
        return district;
    }

    public void setFullAddress(String fullAddress)
    {
        this.fullAddress = fullAddress;
    }

    public String getFullAddress()
    {
        return fullAddress;
    }

    public void setZipCode(String zipCode)
    {
        this.zipCode = zipCode;
    }

    public String getZipCode()
    {
        return zipCode;
    }

    public void setBuyerRemark(String buyerRemark)
    {
        this.buyerRemark = buyerRemark;
    }

    public String getBuyerRemark()
    {
        return buyerRemark;
    }

    public void setSellerRemark(String sellerRemark)
    {
        this.sellerRemark = sellerRemark;
    }

    public String getSellerRemark()
    {
        return sellerRemark;
    }

    public void setDvyTime(Date dvyTime)
    {
        this.dvyTime = dvyTime;
    }

    public Date getDvyTime()
    {
        return dvyTime;
    }

    public void setFinallyTime(Date finallyTime)
    {
        this.finallyTime = finallyTime;
    }

    public Date getFinallyTime()
    {
        return finallyTime;
    }

    public void setCancelTime(Date cancelTime)
    {
        this.cancelTime = cancelTime;
    }

    public Date getCancelTime()
    {
        return cancelTime;
    }

    public void setIsPayed(Integer isPayed)
    {
        this.isPayed = isPayed;
    }

    public Integer getIsPayed()
    {
        return isPayed;
    }

    public void setDeleteStatus(Integer deleteStatus)
    {
        this.deleteStatus = deleteStatus;
    }

    public Integer getDeleteStatus()
    {
        return deleteStatus;
    }

    public void setRefundStatus(Integer refundStatus)
    {
        this.refundStatus = refundStatus;
    }

    public Integer getRefundStatus()
    {
        return refundStatus;
    }

    public void setOrderType(Integer orderType)
    {
        this.orderType = orderType;
    }

    public Integer getOrderType()
    {
        return orderType;
    }

    public void setCloseType(Integer closeType)
    {
        this.closeType = closeType;
    }

    public Integer getCloseType()
    {
        return closeType;
    }

    public List<JtOrderItem> getJtOrderItemList()
    {
        return jtOrderItemList;
    }

    public void setJtOrderItemList(List<JtOrderItem> jtOrderItemList)
    {
        this.jtOrderItemList = jtOrderItemList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("orderId", getOrderId())
                .append("userId", getUserId())
                .append("orderNo", getOrderNo())
                .append("logisticsCompany", getLogisticsCompany())
                .append("trackingNumber", getTrackingNumber())
                .append("freightAmount", getFreightAmount())
                .append("buyQty", getBuyQty())
                .append("currency", getCurrency())
                .append("orderAmount", getOrderAmount())
                .append("paymentAmount", getPaymentAmount())
                .append("reduceAmount", getReduceAmount())
                .append("paymentTime", getPaymentTime())
                .append("orderStatus", getOrderStatus())
                .append("receiver", getReceiver())
                .append("phoneNumber", getPhoneNumber())
                .append("country", getCountry())
                .append("province", getProvince())
                .append("city", getCity())
                .append("district", getDistrict())
                .append("fullAddress", getFullAddress())
                .append("zipCode", getZipCode())
                .append("buyerRemark", getBuyerRemark())
                .append("sellerRemark", getSellerRemark())
                .append("dvyTime", getDvyTime())
                .append("finallyTime", getFinallyTime())
                .append("cancelTime", getCancelTime())
                .append("isPayed", getIsPayed())
                .append("deleteStatus", getDeleteStatus())
                .append("refundStatus", getRefundStatus())
                .append("orderType", getOrderType())
                .append("closeType", getCloseType())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("jtOrderItemList", getJtOrderItemList())
                .toString();
    }
}
